package com.sykj.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.sykj.bean.Book;
import com.sykj.bean.City;
import com.sykj.bean.Flight;
import com.sykj.service.BookService;
import com.sykj.service.CityService;
import com.sykj.service.FlightService;

@RestController
@RequestMapping("/city")
public class CityController {
	
	@Autowired
	private CityService cityService;
	/**
	 * 查询所有城市
	 * @return
	 */
	@RequestMapping("/queryCitys")
	public List<City> queryCitys(){		//单表操作压根不用写服务层和持久层的代码
		return cityService.list();//单表查询直接调mybatis plus的查询所有的方法
	}
}
